/**
* 给试卷增加题目
**/
<template>
  <div>
    <el-container>
      <el-header>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>试卷管理</el-breadcrumb-item>
          <el-breadcrumb-item>添加试卷</el-breadcrumb-item>
        </el-breadcrumb>
      </el-header>
      <el-steps :active="active" style="width: 70%; margin: auto;
  position: relative;" finish-status="success">
        <el-step title="试卷基本信息" description="已完成"></el-step>
        <el-step title="添加试题" description="进行中"></el-step>
        <el-step title="试卷设置" description="未完成"></el-step>
      </el-steps>
      <p />
      <p />
      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
        <h2>添加试题…………</h2>
        <el-form-item>
            <el-button type="primary" @click="submitForm()">下一步</el-button>
          <el-button @click="resetForm('ruleForm')">重置</el-button>
        </el-form-item>
      </el-form>

      <!-- <el-button style="margin-top: 50px;" @click="next">下一步</el-button> -->
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      //步骤
      active: 1,
      //表单元素
      ruleForm: {

      },
      // rules表单验证
      rules: {

      },
    };
  },

  methods: {
    submitForm() {
      this.$router.replace("/text_paper/addPaper/setPaper")
      // this.$refs[formName].validate((valid) => {
      //   if (valid) {

      //   } else {
      //     console.log('error submit!!');
      //     return false;
      //   }
      // });
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    }
  },

  // 创建完毕状态(里面是操作)
  created() {
  },
}

</script>

<style>
.demo-ruleForm {
  width: 700px;
  margin: auto;
  position: relative;
}
</style> */